#include "select.hpp"
#include <iostream>
#include <string>
#include <cstdlib>

static void Usage(std::string proc)
{
    std::cerr << "Usage:" << "\n\t" << proc << " port" << std::endl;
}

//./select_server port
int main(int argc, char *argv[])
{
    if(argc != 2){
        Usage(argv[0]);
        exit(4);
    }

    unsigned short port = atoi(argv[1]);

    my_select::Select *select_svr=new my_select::Select(port);

    select_svr->InitSelect();
    select_svr->Run();

    return 0;
}
